<script setup lang='ts'>
const props = defineProps({
  disabled: Boolean,
  tooltip: {
    type: Boolean,
    default: false,
  },
  content: {
    type: String,
    default: '查看监控',
  },
})
const style = computed(() => {
  return {
    color: props.disabled ? '#c0c4cc' : '#4cd263',
  }
})
</script>

<template>
  <span v-if="tooltip">
    <el-tooltip :content="content" placement="right" effect="dark">
      <el-button text :disabled="disabled" class="iconfont icon-monitor" :style="style" />
    </el-tooltip>
  </span>
  <el-button v-else text :disabled="disabled" class="iconfont icon-monitor" :style="style" />
</template>

<style scoped lang='scss'>
.icon-monitor {
  padding: 4px;
  height: 24px;
  margin: 0;
  font-size: 18px;
}
</style>
